package com.sun.entity.users;

import com.sun.entity.BaseEntity;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.IdClass;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;

/**
 * MP自动填充Handler
 *
 * @Author sun
 * @CreateTime 2025/9/2 01:59
 */

@Data
@Table(name = "user_roles")
@Entity
@SQLDelete(sql = "update user_roles set deleted = 1 where id = ?")
@IdClass(UserRoleEntityPK.class)
public class UserRole extends BaseEntity {
    @Id
    private long userId;
    @Id
    private long roleId;


}
